package xiangmu.schoolpaper.service.impl.system;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import xiangmu.schoolpaper.mapper.system.TeacherinfoMapper;
import xiangmu.schoolpaper.pojo.VO.TeacherinfoVO;
import xiangmu.schoolpaper.service.system.TeacherinfoService;

import java.time.LocalDateTime;

@Service
public class TeacherinfoServiceImpl implements TeacherinfoService {
    @Autowired
    public TeacherinfoMapper teacherinfoMapper;
    @Override
    public void add(TeacherinfoVO teacherinfo) {
        teacherinfo.setCreatedTime(LocalDateTime.now());
        teacherinfo.setUpdatedTime(LocalDateTime.now());
        teacherinfoMapper.add(teacherinfo);
    }

    @Override
    public void update(TeacherinfoVO teacherinfo) {
        teacherinfo.setUpdatedTime(LocalDateTime.now());
        teacherinfoMapper.update(teacherinfo);
    }

    @Override
    public void disabled(TeacherinfoVO ids) {
        teacherinfoMapper.disabled(ids);
    }

    @Override
    public void delete(Integer[] ids) {
        teacherinfoMapper.Updatedel(ids);
    }
}
